﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using CashFlow.Web.Def;
using CashFlow.Db.Entity;
using CashFlow.Web.Models.Order.Result;

namespace CashFlow.Web.Service
{
    public interface IOrderService : IService<OrderEntity>
    {
        IList<OrderBuySellInfoModel> QueryAllOrders2(string date);

        IList<OrderAndUserInfo> QueryAllChildUsersOrder(
            int userId
            , string date
            , int? userState);

        IList<OrderBuySellInfoModel> QueryShopAllChildUsersOrder(
            int userId
            , string date
            , int? visible
            , int? userState);

        int QueryShopAllChildUsersOrderCount(
            int userId
            , string date
            , int? visible
            , int? userState);

        IList<OrderBuySellInfo> QueryOrders(
            int userId
            , string date
            , int visibile);

        IList<OrderEntity> QueryAllOrders(string date);

        bool IsLegalBuySellInfo(
            string date
            , int orderId
            , int buyerUserId
            , int sellerUserId);

        bool UpdateOrderState(int orderId, int state);

        bool UpdateUploadPeymentVoucherImagePath(int orderId, string path);

        bool UpdateUploadPeymentVoucherImagePathAndState(
            int orderId
            , string path
            , int state);
    }
}
